import { Children, lazy } from "react";

const Home=lazy(()=>import('../pages/home/Index'))
const My=lazy(()=>import('../pages/my/Index'))
const Layout=lazy(()=>import('../pages/layout/Index'))
const Login=lazy(()=>import('../pages/login/Index'))
const Login1=lazy(()=>import('../pages/login1/Index'))
const List=lazy(()=>import('../pages/list/Index'))
const Sou=lazy(()=>import('../pages/sou/Index'))
const Xing=lazy(()=>import('../pages/xing/Index'))
const Error=lazy(()=>import('../pages/error/Index'))
const Success=lazy(()=>import('../pages/success/Index'))
const router=[
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/success',
        element:<Success></Success>
    },
    {
        path:'/login1',
        element:<Login1></Login1>
    },
    {
        path:'/list',
        element:<List></List>
    },
    {
        path:'/sou',
        element:<Sou></Sou>
    },
    {
        path:'/xing',
        element:<Xing></Xing>
    },
    {
        path:'*',
        element:<Error></Error>
    },
    {
        path:'/',
        element:<Layout></Layout>,
        children:[
            {
                path:'/',
                element:<Home></Home>
            },
            {
                path:'/my',
                element:<My></My>
            }
        ]
    },
]


export default router



